public class Dog extends Animal {
    public String name;
    /*public Dog(String name) {
        super(name);
        System.out.println("调用了子类的构造");
    }
    public Dog() {
        super("旺财");
        System.out.println("调用了子类的构造");
    }*/
    public Dog(String name) {
        this.name = name;
        super.name = "w";
        age = 10;
        System.out.println("子类的无参构造");

    }
    public void method() {
        System.out.println(age + super.name+"正在汪汪叫");
    }

}
